<?php
	$yhendus=new mysqli("localhost", "if13", "ifikad", "if13_Martin");
	$kask=$yhendus->prepare("SELECT etteaste, syndmus, kell from kuulutused ORDER BY kell;");
    $kask->bind_result($etteaste,$syndmus,$kell);
    $kask->execute();
	
	
	echo"<table border='1'><tr><th>Etteaste</th><th>Sündmus</th><th>kell</th></tr>";
	while($kask->fetch()){
		echo"<tr><td>$etteaste</td><td>$syndmus</td><td>$kell</td></tr>";
	}
?>
	</table>